/* Expense Tracker Styles */

/* Remove Input Spinners */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Expense Section */
.expense-section {
    padding: 8rem 0 4rem;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1f2e 0%, #0f1419 100%);
}

.expense-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.expense-section h1 {
    font-size: 3rem;
    color: #B4D7CE;
    margin-bottom: 1rem;
    text-align: center;
}

.expense-section .subtitle {
    color: #7fa99b;
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Stats Dashboard */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #2c3642 0%, #232a35 100%);
    border: 2px solid #3d4654;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #39A078;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.stat-card.profit-card {
    border-color: #C9A961;
}

.stat-card.profit-card:hover {
    border-color: #C9A961;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.stat-label {
    color: #7fa99b;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-value {
    color: #39A078;
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-sublabel {
    color: #7fa99b;
    font-size: 0.85rem;
}

/* Form Section */
.form-section {
    background-color: #2c3642;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.section-header {
    background: linear-gradient(135deg, #39A078, #2d8060);
    color: white;
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

.header-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-actions-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Expense Form */
.expense-form {
    padding: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group.hidden {
    display: none;
}

.form-group label {
    color: #B4D7CE;
    font-size: 0.95rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select {
    padding: 12px;
    border: 2px solid #3d4654;
    border-radius: 6px;
    background-color: #1a1f2e;
    color: #B4D7CE;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #39A078;
}

.form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #39A078;
}

.form-group label:has(input[type="checkbox"]) {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn-add {
    padding: 14px 30px;
    background: linear-gradient(135deg, #39A078, #2d8060);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(57, 160, 120, 0.3);
}

.filter-select {
    padding: 8px 15px;
    border: 2px solid #3d4654;
    border-radius: 6px;
    background-color: #1a1f2e;
    color: #B4D7CE;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-export,
.btn-danger {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-export {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-export:hover,
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* Category Summary */
.category-summary {
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.category-item {
    background-color: #1a1f2e;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #39A078;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s ease;
}

.category-item:hover {
    transform: translateX(5px);
}

.category-name {
    color: #B4D7CE;
    font-size: 0.9rem;
}

.category-amount {
    color: #39A078;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Transaction List */
.transaction-list {
    padding: 25px;
    max-height: 600px;
    overflow-y: auto;
}

.no-transactions {
    text-align: center;
    padding: 40px;
    color: #7fa99b;
}

.transaction-item {
    background-color: #1a1f2e;
    border: 2px solid #3d4654;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 15px;
    align-items: center;
    transition: all 0.3s ease;
}

.transaction-item:hover {
    border-color: #39A078;
    transform: translateX(5px);
}

.transaction-item.revenue {
    border-left: 4px solid #39A078;
}

.transaction-item.expense {
    border-left: 4px solid #e74c3c;
}

.transaction-icon {
    font-size: 1.8rem;
}

.transaction-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.transaction-category {
    color: #B4D7CE;
    font-weight: 600;
    font-size: 1rem;
}

.transaction-description {
    color: #7fa99b;
    font-size: 0.85rem;
}

.transaction-date {
    color: #7fa99b;
    font-size: 0.85rem;
}

.transaction-amount {
    font-size: 1.3rem;
    font-weight: bold;
}

.transaction-amount.revenue {
    color: #39A078;
}

.transaction-amount.expense {
    color: #e74c3c;
}

.transaction-delete {
    background: transparent;
    border: none;
    color: #e74c3c;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

.transaction-delete:hover {
    transform: scale(1.2);
    color: #ff6b6b;
}

/* Scrollbar */
.transaction-list::-webkit-scrollbar {
    width: 8px;
}

.transaction-list::-webkit-scrollbar-track {
    background: #2c3642;
    border-radius: 10px;
}

.transaction-list::-webkit-scrollbar-thumb {
    background: #3d4654;
    border-radius: 10px;
}

.transaction-list::-webkit-scrollbar-thumb:hover {
    background: #39A078;
}

/* Info Section */
.info-section {
    background-color: #2c3642;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
}

.info-section h3 {
    color: #B4D7CE;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.tax-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.tax-info-card {
    background-color: #1a1f2e;
    padding: 20px;
    border-radius: 8px;
    border-top: 4px solid #39A078;
}

.tax-info-card h4 {
    color: #39A078;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.tax-info-card ul {
    list-style: none;
    padding: 0;
}

.tax-info-card li {
    color: #B4D7CE;
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    font-size: 0.9rem;
}

.tax-info-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #39A078;
    font-weight: bold;
}

.tax-disclaimer {
    color: #C9A961;
    background-color: rgba(201, 169, 97, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #C9A961;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Toast Notifications */
.expense-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #39A078;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1100;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}

.expense-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.expense-toast.error {
    background-color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .expense-section {
        padding: 6rem 0 2rem;
    }

    .expense-section h1 {
        font-size: 2rem;
    }

    .stats-dashboard {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .category-summary {
        grid-template-columns: 1fr;
    }

    .transaction-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .transaction-details {
        order: 1;
    }

    .transaction-amount {
        order: 2;
        text-align: left;
    }

    .transaction-delete {
        order: 3;
    }

    .header-with-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions-group {
        width: 100%;
        flex-direction: column;
    }

    .filter-select,
    .btn-export,
    .btn-danger {
        width: 100%;
    }

    .tax-info-grid {
        grid-template-columns: 1fr;
    }
}
